package com.llf.Blog.Mapper;

import com.llf.Blog.Pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author llf
 * @since 2021-08-07
 */
@Repository
@Mapper
public interface UserMapper extends BaseMapper<User> {
    /**
     *  通过用户名获取用户信息
     * @param username  用户名
     * @return
     */
    User getUser(@Param("username") String username);

    /**
     *  通过id修改密码
     *  password 新密码
     * @return
     */
    int updatePassword(String password);

}
